/**
 * 程序一些插件挂载及载入
 */
import type { App } from 'vue'
import regoPlugins from './modules/plugins'
import regoMount from './modules/mount'
import regoDirective from './modules/directives'

export { store } from './modules/plugins'

export default (app: App<Element>) => {
  regoMount(app)
  regoPlugins(app)
  regoDirective(app)
  // 挂载到 window
  window.$vue = app
}

declare global {
  interface Window {
    $vue: App<Element>
  }
}
